<template>
	<view class="container">
		<uni-card>
			<div class="phone">
				<div class="title">手机号</div>
				<input class="uni-input" v-model="user.phone" placeholder="请输入手机号" />
			</div>
			<div class="username">
				<div class="title">昵称</div>
				<input class="uni-input" v-model="user.username" placeholder="请输入昵称" />
			</div>
			<div class="code">
				<div class="title">code</div>
				<input class="uni-input" v-model="user.code" placeholder="请输入邀请码" />
			</div>
			
			
			<div class="buttom">
				<div class="button denglu" @click="register">注册</div>
				<div class="button zhuce" @click="toLogin">返回登录</div>
			</div>
		</uni-card>

	</view>
</template>

<script setup>
	import {
		user,toLogin,register
	} from './hooks.js'
</script>

<style lang="scss">
	.container {
		padding: 20px;
		font-size: 14px;
		line-height: 24px;

		.phone,.code ,.username{
			display: flex;
			height: 100rpx;

			.title {
				width: 150rpx;
				height: 50rpx;
				line-height: 50rpx;
			}
			input {
				border: 1px solid ;
				padding: 0 10rpx;
				height: 50rpx;
				border-radius: 10rpx;
			}
		}
		.buttom {
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			.denglu {
				width: 300rpx;
				height: 80rpx;
				line-height: 80rpx;
				background: red;
				border-radius: 20rpx;
				text-align: center;
				color: #fff;
				font-size: 30rpx;
			}
			.zhuce {
				height: 80rpx;
				line-height: 80rpx;
			}
		}
	}
</style>